<template>
  <div></div>
</template>

<script setup lang="ts">
import { getFineBIssoToken } from '@/api/login/index'
const route = useRoute()
const data = JSON.parse(route.query.data as string)
if (data.state.split('@@')[0].toLowerCase() == 'finebi') {
  await getFineBIssoToken(data.mobile).then((res) => {
    window.location.href = `https://bi.jmxcf.com:12888/webroot/decision?ssoToken=${res.ssoToken}`
  })
} else if (data.state.split('@@')[0].toLowerCase() == 'uni-app') {
    window.location.href = `http://open.jmxcf.com:9800/?accessToken=${data.accessToken}&refreshToken=${data.refreshToken}&userid=${data.userId}`
}
</script>

<style scoped></style>
